GET the Container id
with:
Content-Type: application/ld+json;Accept: application/ld+json; profile="http://www.w3.org/ns/anno.jsonld"
GET /annotation/w3c/my-container/ HTTP/1.1Accept: application/ld+json; profile="http://www.w3.org/ns/anno.jsonld"Content-Type: application/ld+json;Host: localhost:8080Connection: closeUser-Agent: Paw/3.1.5 (Macintosh; OS X/10.13.4) GCDHTTPRequest
Returns:
HTTP/1.1 200Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel="type"Link: <http://www.w3.org/TR/annotation-protocol/>; rel="http://www.w3.org/ns/ldp#constrainedBy"Allow: POST,GET,OPTIONS,HEADVary: Accept,PreferContent-Location: http://localhost:8080/annotations//w3c/my-container/Accept-Post: application/ld+json; profile="http://www.w3.org/ns/anno.jsonld", text/turtleContent-Type: application/ld+json; profile="http://www.w3.org/ns/anno.jsonld";charset=UTF-8Transfer-Encoding: chunkedDate: Sun, 20 May 2018 19:52:47 GMTConnection: close{"@context" : "http://www.w3.org/ns/anno.jsonld","id" : "http://localhost:8080/annotation/w3c/my-container/","type" : "AnnotationCollection","label" : "A Container for Web Annotations","first" : {"type" : "AnnotationPage","items" : [ {"id" : "http://localhost:8080/annotation/w3c/my-container/e849d4a3-b769-4925-8f08-9214804f0e92","type" : "Annotation","body" : {"type" : "TextualBody","value" : "I like this page!"},"target" : "http://www.example.com/index.html"}, {"id" : "http://localhost:8080/annotation/w3c/my-container/foo-bar","type" : "Annotation","body" : {"type" : "TextualBody","value" : "This one has a SLUG, so I know what id the annotation will have."},"target" : "http://www.example.com/index.html"} ],"partOf" : "http://localhost:8080/annotation/w3c/my-container/","startIndex" : 0},"last" : "http://localhost:8080/annotation/w3c/my-container/?page=0&desc=1","total" : 2}
You can see the paging intrinsic to the W3C Annotation Model.
The annotation server returns:
"total" : 2
And a partOf
link to the Container id
:
"partOf" : "http://localhost:8080/annotation/w3c/my-container/"
And a last
link to the last page in the paged sequence of Annotation Pages.
"last" : "http://localhost:8080/annotation/w3c/my-container/?page=0&desc=1"